
<extend name="Common/common"/>	

<block name='content'>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>任务管理 <span class="c-gray en">&gt;</span> 任务列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="paixu()" class="btn btn-success radius"><i class="Hui-iconfont">&#xe681;</i> 排序</a> <a href="javascript:;" onclick="member_add('添加用户','{:U('taskAdd')}','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加任务</a></span> <span class="r">共有数据：<strong>3</strong> 条</span> </div>
	<div class="mt-20">
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c ">
				<th style="width:50px;">排序</th>
				<th width="80">ID</th>
				<th width="80">任务栏目</th>
				<th width="">任务名称</th>
				<th width="">任务数量</th>
				<th width="">奖励积分</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			<form method="post" action="">
			<volist name="tasks" id="v">
			<tr class="text-c">
				<td><input class="input-text text-c" type="text" name="sort[40]" value="{$v['sort']}"/></td>
				<td>{$v['id']}</td>
				<td><volist name="navs" id="n"><if condition="$v['nav_id'] == $n['id']">{$n['task_nav_name']}</if></volist></td>
				<td>{$v['task_name']}</td>
				<td>{$v['count']}</td>
				<td>{$v['reward']}</td>
				<td class="td-manage"> 
				<a title="编辑" href="javascript:;" onclick="member_edit('编辑','{:U('taskAdd',array('task_id'=>$v['id']))}','4','','510')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> 
				<a title="删除" href="javascript:;" onclick="member_del(this,'{:U('taskDel',array('task_id'=>$v['id']))}')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
			</tr>
			</volist>
			</form>
		</tbody>
	</table>
	</div>
</div>


<!--请在下方写此页面业务相关的脚本-->

<script type="text/javascript">
function paixu(){
	$('form:first').submit();
}

/*用户-添加*/
function member_add(title,url,w,h){
	layer_show(title,url,w,h);
}
/*用户-查看*/
function member_show(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*用户-编辑*/
function member_edit(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*密码-修改*/
function change_password(title,url,id,w,h){
	layer_show(title,url,w,h);	
}
/*用户-删除*/
function member_del(obj,url){
	layer.confirm('确认要删除吗？',function(index){
		$.get(url,function(res){
			if(res == 1){
				$(obj).parents('tr').remove();
				layer.msg('已删除！',{icon:6,time:1000});
			}
		});
	});
}
</script> 

</block>